package stylistcrm.core.services.order.enums;

public enum EnumOrderType {

	PURCHASE_ORDER("0","进货单"),
	TRANSFER_ORDER("1","调货单"),
	INVOICE_ORDER("2","发货单"),
	USER_ORDER("3","用户订单")
	;

	private String code;

	private String desc;

	private EnumOrderType(String code, String desc){
		this.code=code;
		this.desc=desc;
	}
	
	public String getCode(){
		return code;
	}
	
	public String getDesc(){
		return desc;
	}
	
	public static EnumOrderType getEnum(String code) {

        for (EnumOrderType enumValue : EnumOrderType.values()) {
            if (enumValue.getCode().equals(code))
                return enumValue;
        }

        return null;
    }
}
